3.1.9 \(\int \csc ^2(2 a+2 b x) \sin (a+b x) \, dx\) [9]

Optimal. Leaf size=28 \[ -\frac {\tanh ^{-1}(\cos (a+b x))}{4 b}+\frac {\sec (a+b x)}{4 b} \]

[Out]

-1/4*arctanh(cos(b*x+a))/b+1/4*sec(b*x+a)/b

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {4373, 2702, 327, 213} \begin {gather*} \frac {\sec (a+b x)}{4 b}-\frac {\tanh ^{-1}(\cos (a+b x))}{4 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[2*a + 2*b*x]^2*Sin[a + b*x],x]

[Out]

-1/4*ArcTanh[Cos[a + b*x]]/b + Sec[a + b*x]/(4*b)

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2702

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 4373

Int[((f_.)*sin[(a_.) + (b_.)*(x_)])^(n_.)*sin[(c_.) + (d_.)*(x_)]^(p_.), x_Symbol] :> Dist[2^p/f^p, Int[Cos[a
+ b*x]^p*(f*Sin[a + b*x])^(n + p), x], x] /; FreeQ[{a, b, c, d, f, n}, x] && EqQ[b*c - a*d, 0] && EqQ[d/b, 2]
&& IntegerQ[p]

Rubi steps

\begin {align*} \int \csc ^2(2 a+2 b x) \sin (a+b x) \, dx &=\frac {1}{4} \int \csc (a+b x) \sec ^2(a+b x) \, dx\\ &=\frac {\text {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\sec (a+b x)\right )}{4 b}\\ &=\frac {\sec (a+b x)}{4 b}+\frac {\text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (a+b x)\right )}{4 b}\\ &=-\frac {\tanh ^{-1}(\cos (a+b x))}{4 b}+\frac {\sec (a+b x)}{4 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 50, normalized size = 1.79 \begin {gather*} -\frac {\log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )}{4 b}+\frac {\log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )}{4 b}+\frac {\sec (a+b x)}{4 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[2*a + 2*b*x]^2*Sin[a + b*x],x]

[Out]

-1/4*Log[Cos[(a + b*x)/2]]/b + Log[Sin[(a + b*x)/2]]/(4*b) + Sec[a + b*x]/(4*b)

________________________________________________________________________________________

Maple [A]
time = 0.11, size = 31, normalized size = 1.11

method result size
default \(\frac {\frac {1}{\cos \left (x b +a \right )}+\ln \left (\csc \left (x b +a \right )-\cot \left (x b +a \right )\right )}{4 b}\) \(31\)
risch \(\frac {{\mathrm e}^{i \left (x b +a \right )}}{2 b \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}-\frac {\ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right )}{4 b}+\frac {\ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{4 b}\) \(63\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(2*b*x+2*a)^2*sin(b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/4/b*(1/cos(b*x+a)+ln(csc(b*x+a)-cot(b*x+a)))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 236 vs. \(2 (24) = 48\).
time = 0.28, size = 236, normalized size = 8.43 \begin {gather*} \frac {4 \, \cos \left (2 \, b x + 2 \, a\right ) \cos \left (b x + a\right ) - {\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (b x\right )^{2} + 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} - 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right ) + {\left (\cos \left (2 \, b x + 2 \, a\right )^{2} + \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) + 1\right )} \log \left (\cos \left (b x\right )^{2} - 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} + 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right ) + 4 \, \sin \left (2 \, b x + 2 \, a\right ) \sin \left (b x + a\right ) + 4 \, \cos \left (b x + a\right )}{8 \, {\left (b \cos \left (2 \, b x + 2 \, a\right )^{2} + b \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, b \cos \left (2 \, b x + 2 \, a\right ) + b\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(2*b*x+2*a)^2*sin(b*x+a),x, algorithm="maxima")

[Out]

1/8*(4*cos(2*b*x + 2*a)*cos(b*x + a) - (cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1)*log(
cos(b*x)^2 + 2*cos(b*x)*cos(a) + cos(a)^2 + sin(b*x)^2 - 2*sin(b*x)*sin(a) + sin(a)^2) + (cos(2*b*x + 2*a)^2 +
 sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1)*log(cos(b*x)^2 - 2*cos(b*x)*cos(a) + cos(a)^2 + sin(b*x)^2 + 2*s
in(b*x)*sin(a) + sin(a)^2) + 4*sin(2*b*x + 2*a)*sin(b*x + a) + 4*cos(b*x + a))/(b*cos(2*b*x + 2*a)^2 + b*sin(2
*b*x + 2*a)^2 + 2*b*cos(2*b*x + 2*a) + b)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 52 vs. \(2 (24) = 48\).
time = 3.62, size = 52, normalized size = 1.86 \begin {gather*} -\frac {\cos \left (b x + a\right ) \log \left (\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) - \cos \left (b x + a\right ) \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) - 2}{8 \, b \cos \left (b x + a\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(2*b*x+2*a)^2*sin(b*x+a),x, algorithm="fricas")

[Out]

-1/8*(cos(b*x + a)*log(1/2*cos(b*x + a) + 1/2) - cos(b*x + a)*log(-1/2*cos(b*x + a) + 1/2) - 2)/(b*cos(b*x + a
))

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(2*b*x+2*a)**2*sin(b*x+a),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 52 vs. \(2 (24) = 48\).
time = 0.44, size = 52, normalized size = 1.86 \begin {gather*} \frac {\frac {4}{\frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} + 1} + \log \left (-\frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1}\right )}{8 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(2*b*x+2*a)^2*sin(b*x+a),x, algorithm="giac")

[Out]

1/8*(4/((cos(b*x + a) - 1)/(cos(b*x + a) + 1) + 1) + log(-(cos(b*x + a) - 1)/(cos(b*x + a) + 1)))/b

________________________________________________________________________________________

Mupad [B]
time = 0.11, size = 26, normalized size = 0.93 \begin {gather*} \frac {1}{4\,b\,\cos \left (a+b\,x\right )}-\frac {\mathrm {atanh}\left (\cos \left (a+b\,x\right )\right )}{4\,b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b*x)/sin(2*a + 2*b*x)^2,x)

[Out]

1/(4*b*cos(a + b*x)) - atanh(cos(a + b*x))/(4*b)

________________________________________________________________________________________